﻿using System.Windows.Forms;
using System.Drawing;
using Infragistics.Win.Misc;

namespace Crystal.CustomControls
{
    public partial class CrystalLabel : UltraLabel
    {
        public CrystalLabel()
        {
            Layout += CrystalLayout_Layout;
        }
        private void CrystalLayout_Layout(object sender, LayoutEventArgs e)
        {
            int[] Values = new int[3];
            if (CommonCustomControls.IsValidString(StyleManager.GetStyle("LabelForeColor"), ref Values))
            {
                this.ForeColor= Color.FromArgb(Values[0], Values[1], Values[2]);
            }
            if (CommonCustomControls.IsValidString(StyleManager.GetStyle("LabelBackColor"), ref Values))
            {
                this.BackColor = Color.FromArgb(Values[0], Values[1], Values[2]);
            }
        }
    }
}
